package com.feri.pm.controller;

import com.feri.pm.service.intf.SysRoleService;
import com.feri.pm.vo.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 17.角色表(SysRole)表控制层
 *
 * @author makejava
 * @since 2023-03-26 10:40:28
 */
@RestController
@RequestMapping("/api/sysrole/")
@Api(tags = "角色相关接口")
public class SysRoleController {
    /**
     * 服务对象
     */
    @Resource
    private SysRoleService service;

    @GetMapping("add")
    public R add(String name){
        return service.add(name);
    }
    @GetMapping("page")
    public R page(int page,int size){
        return service.queryPage(page, size);
    }
    @GetMapping("updateur")
    public R updateUr(int rid){
        return service.updateByUid(rid);
    }
    @GetMapping("all")
    public R all(){
        return service.all();
    }
}
